package com.qdsgjsfk.vision.adapter;
//
//import android.content.Context;
//import android.content.Intent;
//import android.support.v7.widget.RecyclerView;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.EditText;
//import android.widget.LinearLayout;
//import android.widget.TextView;
//
//import com.rest.response.DeviceResponse;
//import com.rest.response.StudentOtherResponse;
//import com.rest.response.StudentResponse;
//
//import java.util.List;
//
//import butterknife.BindView;
//import butterknife.ButterKnife;
//import qdsg.com.R;
//import qdsg.com.ui.DeviceListActivity;
//
///**
// * Created by HP on 2019/10/31.
// */
//
//public class FragmentOtherAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
//
//    Context context;
//    List<StudentOtherResponse.Other> list;
//    OnItemClickLitener mOnItemClickLitener;
//
//
//    public FragmentOtherAdapter(Context context, List<StudentOtherResponse.Other> list) {
//        this.context = context;
//        this.list = list;
//    }
//
//
//    @Override
//    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//        Context context = parent.getContext();
//        View view = LayoutInflater.from( context )
//                .inflate( R.layout.item_fragment_other, parent, false );
//        return new ViewHolder( view );
//
//    }
//
//    @Override
//    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
//        final ViewHolder myHolder = (ViewHolder) holder;
//        Log.e( "tvOptionNameSize----", list.size() + "");
//        Log.e( "tvOptionName----", list.get( position ).optionName );
//        myHolder.tvOptionName.setText( list.get( position ).optionName );
//        myHolder.etOdData.setText( list.get( position ).odData );
//        myHolder.etOsData.setText( list.get( position ).osData );
//
//        if (mOnItemClickLitener != null) {
//            myHolder.etOdData.setOnClickListener( new View.OnClickListener() {
//                @Override
//                public void onClick(View v) {
////                    Intent bundle = new Intent( context, DeviceListActivity.class );
////                    bundle.putExtra( "type", list.get( position ).type );
////                    bundle.putExtra( "name", list.get( position ).name );
////                    context.startActivity( bundle );
////                    mOnItemClickLitener.onItemClick( myHolder.llDeviceType, list.get( position ).type );
//                }
//            } );
//        }
//
//    }
//
//    @Override
//    public int getItemCount() {
//        return list.size();
//    }
//
//    public interface OnItemClickLitener {
//        void onItemClick(View view, String deviceType);
//    }
//
//
//    public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener) {
//        this.mOnItemClickLitener = mOnItemClickLitener;
//    }
//
//    public class ViewHolder extends RecyclerView.ViewHolder {
//        @BindView(R.id.tv_option_name)
//        TextView tvOptionName;
//        @BindView(R.id.et_od_data)
//        EditText etOdData;
//        @BindView(R.id.et_os_data)
//        EditText etOsData;
//        @BindView(R.id.ll_device_type)
//        LinearLayout llDeviceType;
//
//        public ViewHolder(View itemView) {
//            super( itemView );
//            ButterKnife.bind( this, itemView );
//        }
//    }
//
//}
